﻿using System;

namespace IBNet
{
   /// <summary>
   /// Underlying Component.
   /// </summary>
   public class UnderlyingComponent
   {
      private readonly int contractId;
      private readonly decimal delta;
      private readonly decimal price;

      /// <summary>
      /// Creates a new UnderlyingComponent.
      /// </summary>
      /// <param name="contractId">The contract Id.</param>
      /// <param name="delta">The delta.</param>
      /// <param name="price">The price.</param>
      public UnderlyingComponent(int contractId, decimal delta, decimal price)
      {
         this.contractId = contractId;
         this.delta = delta;
         this.price = price;
      }

      /// <summary>
      /// Gets the contract Id.
      /// </summary>
      public int ContractId { get { return contractId; } }

      /// <summary>
      /// Gets the delta.
      /// </summary>
      public decimal Delta { get { return delta; } }

      /// <summary>
      /// Gets the price.
      /// </summary>
      public decimal Price { get { return price; } }
   }
}
